package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.MenuPermissionMapper;
import cn.csdj.sism.pojo.MenuPermission;
import cn.csdj.sism.service.MenuPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * menuPermissionServiceImpl接口实现类
 * @author 谭世豪
 * 2023/4/10
 */
@Service
public class MenuPermissionServiceImpl implements MenuPermissionService {

    @Autowired
    private MenuPermissionMapper menuPermissionMapper;


    @Override
    public int insert(MenuPermission menuPermission) {
        return menuPermissionMapper.insert(menuPermission);
    }

    @Override
    public int deleteById(Integer id) {
        return menuPermissionMapper.deleteById(id);
    }

    @Override
    public List<MenuPermission> selectAll() {
        return menuPermissionMapper.selectList(null);
    }

    @Override
    public MenuPermission selectById(Integer id) {
        return menuPermissionMapper.selectById(id);
    }

    @Override
    public int update(MenuPermission menuPermission) {
        return menuPermissionMapper.updateById(menuPermission);
    }
}
